package com.carkeeper.shop.feign;
import com.carkeeper.entity.PageResult;
import com.carkeeper.entity.Result;
import com.carkeeper.shop.pojo.StoreUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@FeignClient(name = "shop")
public interface StoreUserFeign {
    /**
     * 已通过审核的服务商的展示
     * 展示已通过审核的服务商
     */
    @GetMapping("/storeUser/findPage/{page}/{size}")
    public PageResult findPage(@RequestParam Map searchMap, @PathVariable("page") String page, @PathVariable("size") String size);

    /**
     * 确认创建管理员
     */
    @PostMapping("/storeUser/saveAdmin")
    public Result saveAdmin(@RequestBody StoreUser storeUser);

    /**
     * 查看用户
     */
    @GetMapping("/storeUser/userId/{page}/{size}")
    public PageResult userId(@RequestParam Map searchMap, @PathVariable("page") String page, @PathVariable("size") String size);

    /**
     * 重置用户密码
     */
    @PutMapping("/storeUser/reset/{username}")
    public Result reset(@PathVariable("username") String username);

    /**
     * 锁定与解锁用户
     */
    @PutMapping("/storeUser/lockUser/{username}")
    public Result lockUser(@PathVariable("username") String username);

    @GetMapping("/storeUser/createAdmin/{id}")
    public Map createAdmin(@PathVariable("id") String id);

}
